﻿{% extends "base.html" %}
{% load tags %}
{% block title %}Projekto intensyvumo ataskaita{% endblock %}
{% block pickDate %}{% include "monthPicker.html" %}{% endblock %}
{% block content %}
<h1 class="headerText">Projekto intensyvumo ataskaita</h1>
{% if image %}<img src="{{ image }}" />{% endif %}
<br />
<br />
<table class="sortable reportTable" >
  <thead>
    <tr>
      <th rowspan="2" sort_index="0">Data</th>
      <th colspan="2">Išdirbtos valandos</th>
      <th rowspan="2" sort_index="3">Viso</th>
    </tr>
    <tr>
      <th sort_index="1">Šio skyriaus</th>
      <th sort_index="2">Kitų skyrių</th>
    </tr>
  </thead>
  <tbody>
    {% for p in project %}
    <tr class="{{ forloop.counter|oddOrEven }}">
      <td>{{ p.date|date:"Y-m" }}</td>
      <td>{{ p.local }}</td>
      <td>{{ p.foreign }}</td>
      <td>{{ p.total }}</td>
    </tr>
    {% endfor %}
  </tbody>
  <tfoot>
    <tr>
      <td class="tal">Viso: </td>
      <td>{{ project|columnTotal:"local" }}</td>
      <td>{{ project|columnTotal:"foreign" }}</td>
      <td>{{ project|columnTotal:"total" }}</td>
    </tr>
  </tfoot>
</table>
{% endblock %}
